package com.itheima.controller;

import com.itheima.service.EsAddService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;

@RestController("/es")
public class EsAddController {

    @Resource
    private EsAddService esAddService;

    @GetMapping("/add")
    public String esAdd() throws IOException {
        return esAddService.esAdd();
    }

    @GetMapping("/findAll")
    public List esFindAll() throws IOException {
        return esAddService.esFindAll();
    }
}
